<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <aaa></aaa>
      <format></format>
  </div>
  <div id="app2">
    <aaa></aaa>
    <format></format>
  </div>
  <script src="./vue.js"></script>
  <script>

    Vue.component("format",{
        data(){
            return {
                msg:'global component'
            }
        },
        template:`<h2>{{msg}}</h2>`
    })

    var vm = new Vue({
      el:'#app',
      data:{},
      methods:{
      },
      components: {
          aaa: {
            data() {
            return {
                msg:"app not good"
            }
          },
              template:`<h2>{{msg}}</h2>`
          }
      }
     });

     new Vue({
         el:"#app2",
         data:{},
         components: {
          aaa: {
            data() {
            return {
                msg:"app2 not good"
            }
          },
              template:`<h2>{{msg}}</h2>`
          }
      }
     })
  </script>
</body>
</html>
